﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Configurations;

namespace Pixysoft.Framework.Logs
{
    public interface IRecordCollection : IEnumerable<IRecord>, IEnumerator<IRecord>
    {
        void Sort();

        int Count { get; }


        /// <summary>
        /// 直接从node获取record节点
        /// </summary>
        /// <param name="record"></param>
        IRecord Add(IXmlNode node);

        /// <summary>
        /// 添加一个新的record
        /// </summary>
        /// <param name="elementName"></param>
        /// <returns></returns>
        IRecord Add(string elementName);

        /// <summary>
        /// 直接添加输入的record
        /// </summary>
        /// <param name="record"></param>
        void Add(IRecord record);

        /// <summary>
        /// 根据索引获取对象
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        IRecord this[int index] { get;}

        void Clear();

        bool Contains(IRecord item);

        bool Contains(string elementName);

    }
}
